package com.xjzp.business.db.hibernate.po.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the tb_subject table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="tb_subject"
 */

public abstract class BaseTbSubject  implements Serializable {

	public static String REF = "TbSubject";
	public static String PROP_LAST_TIME = "LastTime";
	public static String PROP_LAST_PERSON_ID = "LastPersonId";
	public static String PROP_SUBJECT_COMPANY_PRICE = "SubjectCompanyPrice";
	public static String PROP_SUBJECT_NAME = "SubjectName";
	public static String PROP_SUB1 = "Sub1";
	public static String PROP_SUBJECT_YEAR = "SubjectYear";
	public static String PROP_ID = "Id";
	public static String PROP_SUBJECT_UNIT_PRICE = "SubjectUnitPrice";


	// constructors
	public BaseTbSubject () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseTbSubject (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String subjectName;
	private java.math.BigDecimal subjectUnitPrice;
	private java.math.BigDecimal subjectCompanyPrice;
	private java.lang.String subjectYear;
	private java.lang.String lastTime;
	private java.lang.Integer lastPersonId;
	private java.lang.String sub1;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="increment"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: subject_name
	 */
	public java.lang.String getSubjectName () {
		return subjectName;
	}

	/**
	 * Set the value related to the column: subject_name
	 * @param subjectName the subject_name value
	 */
	public void setSubjectName (java.lang.String subjectName) {
		this.subjectName = subjectName;
	}



	/**
	 * Return the value associated with the column: subject_unit_price
	 */
	public java.math.BigDecimal getSubjectUnitPrice () {
		return subjectUnitPrice;
	}

	/**
	 * Set the value related to the column: subject_unit_price
	 * @param subjectUnitPrice the subject_unit_price value
	 */
	public void setSubjectUnitPrice (java.math.BigDecimal subjectUnitPrice) {
		this.subjectUnitPrice = subjectUnitPrice;
	}



	/**
	 * Return the value associated with the column: subject_company_price
	 */
	public java.math.BigDecimal getSubjectCompanyPrice () {
		return subjectCompanyPrice;
	}

	/**
	 * Set the value related to the column: subject_company_price
	 * @param subjectCompanyPrice the subject_company_price value
	 */
	public void setSubjectCompanyPrice (java.math.BigDecimal subjectCompanyPrice) {
		this.subjectCompanyPrice = subjectCompanyPrice;
	}



	/**
	 * Return the value associated with the column: subject_year
	 */
	public java.lang.String getSubjectYear () {
		return subjectYear;
	}

	/**
	 * Set the value related to the column: subject_year
	 * @param subjectYear the subject_year value
	 */
	public void setSubjectYear (java.lang.String subjectYear) {
		this.subjectYear = subjectYear;
	}



	/**
	 * Return the value associated with the column: last_time
	 */
	public java.lang.String getLastTime () {
		return lastTime;
	}

	/**
	 * Set the value related to the column: last_time
	 * @param lastTime the last_time value
	 */
	public void setLastTime (java.lang.String lastTime) {
		this.lastTime = lastTime;
	}



	/**
	 * Return the value associated with the column: last_person_id
	 */
	public java.lang.Integer getLastPersonId () {
		return lastPersonId;
	}

	/**
	 * Set the value related to the column: last_person_id
	 * @param lastPersonId the last_person_id value
	 */
	public void setLastPersonId (java.lang.Integer lastPersonId) {
		this.lastPersonId = lastPersonId;
	}



	/**
	 * Return the value associated with the column: sub_1
	 */
	public java.lang.String getSub1 () {
		return sub1;
	}

	/**
	 * Set the value related to the column: sub_1
	 * @param sub1 the sub_1 value
	 */
	public void setSub1 (java.lang.String sub1) {
		this.sub1 = sub1;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.xjzp.business.db.hibernate.po.TbSubject)) return false;
		else {
			com.xjzp.business.db.hibernate.po.TbSubject tbSubject = (com.xjzp.business.db.hibernate.po.TbSubject) obj;
			if (null == this.getId() || null == tbSubject.getId()) return false;
			else return (this.getId().equals(tbSubject.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}